home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 17 / Developer Source Volume 17 (I-MODE Publications, Inc.)(2000).iso / sdevl / 8b1 / 1p40.gif < prev    next >
Graphics Interchange Format  |  1999-03-17  |  41KB  |  189x826  |  4-bit (16 colors)
Labels: text | screenshot | font | number | document
OCR: Swing's Look and Feel Pluggable look and feel is one of Swing's cooler features: It lets you cre- ate Java programs that look and be- have like the underlying operating system . Windows, UNIX, or Macin- tosh (scc figures). Sun's Swing devel- opibent team is also promoting an official cross-platform Java look and feel -- formerly code-named "Metal" afor Java developers who want the same user interface for their applica- tions across all operating systems. Windows UNIX Macintosh Metal Because Sun's Swing team hasn't determined whether or not it has the right to deliver the Windows user interface on platformas other than Windows, there is a locking mecha- nism on the Windows look and feel. Even though Microsoft has been accused of appropriating the Netscape Navigator user interface for its own cross-platformi Internet Explorer browser, it's unlikely that the legal eagles at Microsoft will allow the lock to be removed anytime soon. The team was not as circumspect with the other operating system user interfaces. To use the KaclookAndFeel, you need Swing 1.1 beta (at a minimum). You'll also need to add nac. jar to your class wath and add the following code to your Swing-based application: try { UNVarager . SetLook AndFeel {"con Sun. java. swing.plat .tec. MacLookAndFeel "); } catch ( Exception e ) { Systen. cut.println ("Couldn't .. load Nac BockAndFeel" + B); -Roger Smith